#include "sk_common.h"
#ifdef WIN32_PC
#include "string.h"
#include "memory.h"
#include "stdlib.h"
#endif

SK_UINT32 g_mem_totalMallocSize = 0;
SK_UINT32 g_mem_volumnSize = 0;

SK_BOOL SK_MEM_init(SK_UINT32 totalSize)
{
	g_mem_volumnSize = 	totalSize;
	return TRUE;
}

void   SK_MEM_destroy()
{
	//todo
}
void*  SK_MEM_malloc(SK_UINT32 len)
{
#ifdef WIN32_PC
	return malloc(len);
#endif

}
void  SK_MEM_free(void *pBuf)
{
#ifdef WIN32_PC
	free(pBuf);
#endif
}
void   SK_MEM_copy(void *dst,const void* src,SK_UINT32 len)
{
#ifdef WIN32_PC
	memcpy(dst,src,len);
#endif
}
void   SK_MEM_set(void* dst,SK_BYTE value,SK_UINT32 len)
{
#ifdef WIN32_PC
	memset(dst,value,len);
#endif
}
SK_UINT32  SK_MEM_getUsedSize()
{
	return g_mem_totalMallocSize;
}